// my_jtag_atlantic.cpp : Defines the exported functions for the DLL application.
//

#include "stdafx.h"
#include "my_jtag_atlantic.h"

JTAGATLANTIC* link;
extern "C" __declspec(dllexport) int open_jtag(){
	link = jtagatlantic_open("USB-Blaster [USB-0]", 0x0, -1, NULL);
	return (int)link;
}

extern "C" __declspec(dllexport) void close_jtag(int val){
	jtagatlantic_close(link);
}

extern "C" __declspec(dllexport) int write_jtag(int count, char* buff, int index){
	return jtagatlantic_write(link, buff + index, count);
}

extern "C" __declspec(dllexport) void flush_jtag(){
	jtagatlantic_flush(link);
}

extern "C" __declspec(dllexport) int read_jtag(int count, char* buff, int index){
	return jtagatlantic_read(link, buff + index, count);
}

